package com.neusoft.neumooc.service.front;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.neusoft.core.common.BaseService;
import com.neusoft.core.common.exception.ServiceException;
import com.neusoft.neumooc.dao.front.ContentDAO;
import com.neusoft.neumooc.vo.ColumnsVO;
import com.neusoft.neumooc.vo.ContentVO;
import com.neusoft.neumooc.vo.MenuVO;
import com.neusoft.neumooc.vo.TemplatesVO;

@Service
@Transactional
public class ContentServiceImpl extends BaseService implements ContentService {
	@Autowired
	ContentDAO contentdao;

	@Override
	public List<ColumnsVO> getColumnsVo(String typeId) throws ServiceException {
		return contentdao.getColumnsVo(typeId);
	}

	@Override
	public List<TemplatesVO> getTemplatesVo() throws ServiceException {
		return contentdao.getTemplatesVo();
	}

	@Override
	public List<ContentVO> getContentVo(String columnsId, int pageIndex,
			int pageSize) throws ServiceException {
		return contentdao.getContentVo(columnsId, pageIndex, pageSize);
	}

	@Override
	public String getColumnIdByColumnName(String columnName)
			throws ServiceException {
		return contentdao.getColumnIdByColumnName(columnName);
	}

	@Override
	public String getTypeIdByColumnId(String columnId) throws ServiceException {
		return contentdao.getTypeIdByColumnId(columnId);
	}

	@Override
	public String getListTplFileByColumnId(String columnId)
			throws ServiceException {
		return contentdao.getListTplFileByColumnId(columnId);
	}

	@Override
	public String getPageTplFileByColumnId(String columnId)
			throws ServiceException {
		return contentdao.getPageTplFileByColumnId(columnId);
	}

	@Override
	public int getContentVoNum(String columnId) throws ServiceException {
		return contentdao.getContentVoNum(columnId);
	}

	@Override
	public List<ContentVO> getContentDetail(String contentid)
			throws ServiceException {
		return contentdao.getContentDetail(contentid);
	}

	@Override
	public List<ContentVO> getSearchInfo(String search, int pageIndex,
			int pageSize) throws ServiceException {
		return contentdao.getSearchInfo(search, pageIndex, pageSize);
	}

	@Override
	public int getSearchInfoNum(String search) throws ServiceException {
		return contentdao.getSearchInfoNum(search);
	}

	@Override
	public String getListTplFileByTypeId(String typeId) throws ServiceException {
		return contentdao.getListTplFileByColumnId(typeId);
	}

	@Override
	public String getPageTplFileByTypeId(String typeId) throws ServiceException {
		return contentdao.getPageTplFileByColumnId(typeId);
	}

	@Override
	public String getColumnNameByColumnId(String columnId)
			throws ServiceException {
		return contentdao.getColumnNameByColumnId(columnId);
	}

	@Override
	public MenuVO getMenuNameByColumnId(String columnId)
			throws ServiceException {
		return contentdao.getMenuNameByColumnId(columnId);
	}

	@Override
	public String getMenuNameUsByColumnId(String columnId)
			throws ServiceException {
		return contentdao.getMenuNameUsByColumnId(columnId);
	}

	@Override
	public String getTitleByContentId(String contentId) throws ServiceException {
		return contentdao.getTitleByContentId(contentId);
	}

	@Override
	public String getColumnIdByContentId(String contentId)
			throws ServiceException {
		return contentdao.getColumnIdByContentId(contentId);
	}
}
